package com.md.lianxi;

import java.util.Scanner;

public class LianXi05 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a=0;
		
		for (int i = 1998; i <=2008; i++) {
			if (i % 4 == 0 && i % 100!=0 || i%400==0) {
				System.out.println(i);
				
			}
		}	
	}
}